//package com.warehouse.config;
//
//import com.pets_ordering_food.interceptor.LoginInterceptor;
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.bind.annotation.CrossOrigin;
//import org.springframework.web.servlet.HandlerInterceptor;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//import java.util.ArrayList;
//import java.util.List;
//
//@CrossOrigin
//@Configuration
//public class AdminWebConfig implements WebMvcConfigurer {
//
//    @Bean
//    public HandlerInterceptor getMyInterceptor(){
//        return new LoginInterceptor();
//    }
//
//
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//
//
//
//        //需要登录验证的
//        List<String> admin = new ArrayList<>();
//
//        //不需要登录验证的
//        List<String> pass = new ArrayList<>();
//        registry.addInterceptor(getMyInterceptor())
//                .addPathPatterns("/**")
//                .excludePathPatterns("/Images/upload","/swagger-resources/**", "/webjars/**",
//                        "/v2/**", "/swagger-ui.html/**",
//                        "/*/*.css", "/*/*.js", "/*/*.png", "/*/*.jpg",
//                        "/*/*.jpeg", "/*/*.gif", "/*/fonts/*", "/*/*.svg",
//
//                        "/login/login","/images/**","/user/userLogin","/decrypt","/get","/menberSuccess","/pay/**","/success",
//                        "/milkyTea/listMilkyTeaAll","/milkyTea/listMilkyTeaLikeName","/userCoupon/getQRCode",
//                        "/milkyTea/getMilkyTeaById","/commodity/listCommodityInXCX","/carousel/**",
//                        "/commodity/getCommodityInXCX","/successWillte","/success","/activity/**","/font/**",
//                        "/commodity/listCommodityLikeNameInXCX","/coupon/listCouponVO","/recommend/**","/store/**","/open/getOpen");
//    }
//}
